function dashMenuToggle() { $('.app-container').toggleClass('sidebar-action'); } function homeMenuToggle() { $('.head-menu').slideToggle(200); } function mainDropdown() { $('.main-dd').toggleClass('hidden'); } $(function () { $('[data-toggle="tooltip"]').tooltip(); if($("#dc-body").length) { $("#dc2-body").height($("#dc-body").height()); } }) $(document).ready(function() { setList(0); setList(1); }); function ikon(opt) { var ikon = ""; if (opt.indexOf("Instagram") >= 0) { ikon = " "; } else if (opt.indexOf("IGTV") >= 0) { ikon = " "; } else if (opt.indexOf("Facebook") >= 0) { ikon = " "; } else if (opt.indexOf("Youtube") >= 0) { ikon = " "; } else if (opt.indexOf("YouTube") >= 0) { ikon = " "; } else if (opt.indexOf("Twitter") >= 0) { ikon = " "; } else if (opt.indexOf("Google") >= 0) { ikon = " "; } else if (opt.indexOf("Soundcloud") >= 0) { ikon = " "; } else if (opt.indexOf("Spotify") >= 0) { ikon = " "; } else if (opt.indexOf("Apple") >= 0) { ikon = " "; } else if (opt.indexOf("Telegram") >= 0) { ikon = " "; } else if (opt.indexOf("Pinterest") >= 0) { ikon = " "; } else if (opt.indexOf("Twitch") >= 0) { ikon = " "; } else if (opt.indexOf("Tik") >= 0) { ikon = " "; } else if (opt.indexOf("Web") >= 0) { ikon = " "; } else if (opt.indexOf("Diğer") >= 0) { ikon = " "; } else if (opt.indexOf("Tumblr") >= 0) { ikon = " "; } else if (opt.indexOf("Müzik") >= 0) { ikon = " "; } else if (opt.indexOf("Periscope") >= 0) { ikon = " "; } else if (opt.indexOf("Snapchat") >= 0) { ikon = " "; } return ikon; } function setList(val) { if (val == 0) { $("#orders-drop").empty(); $("#orderform-service option").each(function() { if ($(this).attr('data-show') != 'hidden') { var ico = ikon($(this).text()); $("#orders-drop").append(''); } }); var e = document.getElementById("orderform-service"); var selected = e.options[e.selectedIndex].text; var ico = ikon(selected); $("#order-services").html(ico + selected); } else if (val == 1) { $("#category-drop").empty(); $("#orderform-category option").each(function() { if ($(this).attr('data-show') != 'hidden') { var ico = ikon($(this).text()); $("#category-drop").append(''); } }); var e = document.getElementById("orderform-category"); var selected = e.options[e.selectedIndex].text; var ico = ikon(selected); $("#order-category").html(ico + selected); } } $(function(ready) { $("#orderform-service").change(function() { setList(0); }); $("#orderform-category").change(function() { setList(1); }); }); function selectOrder(val) { $('#orderform-service').val(val); $("#orderform-service").trigger("change"); var ico = ikon($("#orderform-service option[value='" + val + "']").text()); $("#order-services").html(ico + $("#orderform-service option[value='" + val + "']").text()); } $("#order-sItem").click(function() { $("#order-services").html($(this).html()); }); function selectCategory(val) { $('#orderform-category').val(val); $("#orderform-category").trigger("change"); var ico = ikon($("#orderform-category option[value='" + val + "']").text()); $("#order-category").html(ico + $("#orderform-category option[value='" + val + "']").text()); } function selectCategory(val) { $('#orderform-category').val(val); $("#orderform-category").trigger("change"); var ico = ikon($("#orderform-category option[value='" + val + "']").text()); $("#order-category").html(ico + $("#orderform-category option[value='" + val + "']").text()); } $(document).ready(function() { $("#serv-inp").on("keyup", function() { var value = $(this).val().toLowerCase(); $(".app-mtable tr").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); }); $('.sss-tab').click(function() { if ($(this).hasClass('active')) { $(this).find('.ss-tab-content').slideToggle(200); $(this).toggleClass('active'); } else { $('.sss-tab').removeClass('active'); $('.sss-tab > .ss-tab-content').slideUp(200); $(this).find('.ss-tab-content').slideToggle(200); $(this).toggleClass('active'); } }); function change_mode() { var app = document.getElementsByTagName("BODY")[0]; if (localStorage.lightMode == "dark") { localStorage.lightMode = "light"; app.setAttribute("class", "light"); } else { localStorage.lightMode = "dark"; app.setAttribute("class", "dark"); } console.log("lightMode = " + localStorage.lightMode); }